/* 控制面板主容器 */
.control-panel {
  height: 100%;
}

.control-panel .ant-card {
  margin-bottom: 0;
}

.control-panel .ant-card-body {
  padding: 12px;
}

.control-panel .ant-card-head {
  min-height: 40px;
  padding: 0 12px;
}

.control-panel .ant-card-head-title {
  font-size: 14px;
  line-height: 40px;
}

/* 实验参数组件样式 */
.experiment-parameters .parameter-item {
  margin-bottom: 8px;
}

.experiment-parameters .parameter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.experiment-parameters .parameter-value {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* 实验控制组件样式 */
.experiment-control .control-btn {
  transition: all 0.3s ease;
}

.experiment-control .control-btn-start {
  min-width: 120px;
}

.experiment-control .control-btn-reset {
  min-width: 120px;
}

.experiment-control .control-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79, 195, 247, 0.3);
}

.experiment-control .status-display {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.experiment-control .connection-status {
  padding: 8px 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.experiment-control .connection-status.connected {
  background: rgba(76, 175, 80, 0.1);
  border-color: rgba(76, 175, 80, 0.3);
}

.experiment-control .connection-status.disconnected {
  background: rgba(244, 67, 54, 0.1);
  border-color: rgba(244, 67, 54, 0.3);
}

.experiment-control .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  animation: pulse 1.5s infinite;
}

.experiment-control .status-dot.connected {
  background-color: #4caf50;
  box-shadow: 0 0 8px #4caf50;
}

.experiment-control .status-dot.disconnected {
  background-color: #f44336;
  box-shadow: 0 0 8px #f44336;
}

/* 运动控制组件样式 */
.motion-control .motion-group {
  margin-bottom: 8px;
}

.motion-control .motion-btn {
  transition: all 0.3s ease;
  min-width: 80px;
}

.motion-control .motion-btn:hover {
  transform: translateY(-1px);
}

.motion-control .btn-m {
  background: linear-gradient(135deg, #4fc3f7, #29b6f6);
  border-color: #4fc3f7;
  color: white;
}

.motion-control .btn-m:hover {
  background: linear-gradient(135deg, #29b6f6, #0288d1);
  border-color: #29b6f6;
  color: white;
}

.motion-control .btn-u {
  background: linear-gradient(135deg, #66bb6a, #4caf50);
  border-color: #66bb6a;
  color: white;
}

.motion-control .btn-u:hover {
  background: linear-gradient(135deg, #4caf50, #388e3c);
  border-color: #4caf50;
  color: white;
}

.motion-control .btn-n {
  background: linear-gradient(135deg, #ffa726, #ff9800);
  border-color: #ffa726;
  color: white;
}

.motion-control .btn-n:hover {
  background: linear-gradient(135deg, #ff9800, #f57c00);
  border-color: #ff9800;
  color: white;
}

.motion-control .btn-clear {
  background: linear-gradient(135deg, #ef5350, #f44336);
  border-color: #ef5350;
  color: white;
}

.motion-control .btn-clear:hover {
  background: linear-gradient(135deg, #f44336, #d32f2f);
  border-color: #f44336;
  color: white;
}

.motion-control .motion-input-group {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* 同步状态组件样式 */
.sync-status .status-item {
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sync-status .status-item:last-child {
  border-bottom: none;
}

.sync-status .performance-indicators {
  margin-top: 12px;
}

.sync-status .indicator-bar {
  height: 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.sync-status .indicator-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 10px;
  color: #ffffff;
  font-weight: 500;
  z-index: 2;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.sync-status .indicator-fill {
  height: 100%;
  transition: width 0.3s ease;
  border-radius: 10px;
  position: relative;
}

.sync-status .indicator-bar.success .indicator-fill {
  box-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

.sync-status .indicator-bar.warning .indicator-fill {
  box-shadow: 0 0 10px rgba(255, 152, 0, 0.5);
}

.sync-status .indicator-bar.error .indicator-fill {
  box-shadow: 0 0 10px rgba(244, 67, 54, 0.5);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .control-panel .ant-card-body {
    padding: 8px;
  }
  
  .experiment-control .control-btn {
    font-size: 12px;
    height: 32px;
    min-width: 80px;
  }
  
  .motion-control .motion-btn {
    font-size: 11px;
    height: 28px;
    min-width: 60px;
  }
  
  .experiment-parameters .parameter-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  
  .sync-status .indicator-bar {
    height: 16px;
  }
  
  .sync-status .indicator-label {
    font-size: 9px;
  }
}

@media (max-width: 480px) {
  .control-panel .ant-card-head-title {
    font-size: 12px;
  }
  
  .experiment-control .status-display {
    padding: 8px;
  }
  
  .motion-control .motion-input-group {
    padding: 8px;
  }
  
  .experiment-control .control-btn-start,
  .experiment-control .control-btn-reset {
    min-width: 70px;
    font-size: 11px;
  }
}

/* 动画效果 */
@keyframes pulse {
  0% { 
    opacity: 1; 
  }
  50% { 
    opacity: 0.5; 
  }
  100% { 
    opacity: 1; 
  }
}

/* 禁用状态样式 */
.control-panel .ant-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.control-panel .ant-input-number:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
